package com.cdhkppm.dto;


import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.hustcad.plm.rpm.model.anno.DateValidation;
import com.hustcad.plm.rpm.model.dto.active.PlusTaskSaveDTO;
import com.hustcad.plm.rpm.model.dto.active.TyppmPlusPredecessorLinkDTO;
import com.hustcad.plm.rpm.model.dto.message.ObjectMsgTempLinkDTO;
import com.hustcad.plm.rpm.model.dto.outrule.OutRuleParamDTO;
import com.ty.basic.utils.excel.annotation.ExcelProperty;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;


/**
 * @author yfq
 * @apiNote
 */
@EqualsAndHashCode(callSuper = true)
@Data
public class CustomPlusTaskSaveDTO extends PlusTaskSaveDTO{
    @ApiModelProperty("子节点")
    @JSONField(name = "children")
    private List<CustomPlusTaskSaveDTO> children = new ArrayList<>();

    @JsonProperty("UID")
    @ApiModelProperty("唯一标识,对应oid")
    @JSONField(
            name = "UID"
    )
    private @NotNull(
            message = "PARAMS_NOT_EMPTY"
    ) @Pattern(
            regexp = "^$|^[0-9]+$",
            message = "PARAMS_NOT_LEGAL"
    ) String oid;
    @JsonProperty("Duration")
    @ApiModelProperty("工期")
    @JSONField(
            name = "Duration"
    )
    private @NotNull(
            message = "PARAMS_NOT_EMPTY"
    ) String duration;
    @JsonProperty("PercentComplete")
    @ApiModelProperty("完成百分比")
    @JSONField(
            name = "PercentComplete"
    )
    private String percentWorkComplete;
    @JsonProperty("Milestone")
    @ApiModelProperty("里程碑")
    @JSONField(
            name = "Milestone"
    )
    private String milestone;
    @JsonProperty("ConstraintDate")
    @ApiModelProperty("限制日期")
    @DateValidation(
            message = "PARAMETER_INVALID_DATE"
    )
    @JSONField(
            name = "ConstraintDate"
    )
    private String constraintDate;
    @JsonProperty("ConstraintType")
    @ApiModelProperty("限制类型")
    @JSONField(
            name = "ConstraintType"
    )
    private String constraintType;
    @JsonProperty("Critical")
    @ApiModelProperty("关键任务")
    @JSONField(
            name = "Critical"
    )
    private String critical;
    @JsonProperty("Work")
    @ApiModelProperty("实际工时")
    @JSONField(
            name = "Work"
    )
    private String work;
    @JsonProperty("Summary")
    @ApiModelProperty("摘要任务")
    @JSONField(
            name = "Summary"
    )
    private String summary;
    @JsonProperty("EffortDriven")
    @ApiModelProperty("投入比导向")
    @JSONField(
            name = "EffortDriven"
    )
    private String effortDriven;
    @JsonProperty("EarlyStart")
    @ApiModelProperty("最早开始时间")
    @DateValidation(
            message = "PARAMETER_INVALID_DATE"
    )
    @JSONField(
            name = "EarlyStart"
    )
    private String earlyStart;
    @JsonProperty("EarlyFinish")
    @ApiModelProperty("最早完成时间")
    @DateValidation(
            message = "PARAMETER_INVALID_DATE"
    )
    @JSONField(
            name = "EarlyFinish"
    )
    private String earlyFinish;
    @JsonProperty("LateFinish")
    @ApiModelProperty("最早开始时间")
    @DateValidation(
            message = "PARAMETER_INVALID_DATE"
    )
    @JSONField(
            name = "LateFinish"
    )
    private String lateFinish;
    @JsonProperty("LateStart")
    @ApiModelProperty("最晚完成时间")
    @DateValidation(
            message = "PARAMETER_INVALID_DATE"
    )
    @JSONField(
            name = "LateStart"
    )
    private String lateStart;
    @JsonProperty("ActualFinish")
    @ApiModelProperty("实际完成日期")
    @DateValidation(
            message = "PARAMETER_INVALID_DATE"
    )
    @JSONField(
            name = "ActualFinish"
    )
    private String actualFinishDate;
    @JsonProperty("ActualStart")
    @ApiModelProperty("实际开始日期")
    @DateValidation(
            message = "PARAMETER_INVALID_DATE"
    )
    @JSONField(
            name = "ActualStart"
    )
    private String actualStartDate;
    @JsonProperty("Priority")
    @ApiModelProperty("重要级别")
    @JSONField(
            name = "Priority"
    )
    private String priority;
    @JsonProperty("Active")
    @JSONField(
            name = "Active"
    )
    private String active;
    @JsonProperty("ID")
    @ApiModelProperty("任务序号")
    @JSONField(
            name = "ID"
    )
    private @NotNull(
            message = "PARAMS_NOT_EMPTY"
    ) String lineNumber;
    @JsonProperty("Name")
    @JSONField(
            name = "Name"
    )
    private @NotNull(
            message = "PARAMS_NOT_EMPTY"
    ) String name;
    @JsonProperty("OutlineLevel")
    @ApiModelProperty("任务层次")
    @JSONField(
            name = "OutlineLevel"
    )
    private @NotNull(
            message = "PARAMS_NOT_EMPTY"
    ) String outLineLevel;
    @JsonProperty("OutlineNumber")
    @ApiModelProperty("大纲字段")
    @JSONField(
            name = "OutlineNumber"
    )
    private @NotNull(
            message = "PARAMS_NOT_EMPTY"
    ) String outLineNumber;
    @JsonProperty("WBS")
    @ApiModelProperty("WBS编码")
    @JSONField(
            name = "WBS"
    )
    private String wbs;
    @JsonProperty("ParentTaskUID")
    @ApiModelProperty("父任务UID")
    @JSONField(name = "parentId")
    private @NotNull(
            message = "PARAMS_NOT_EMPTY"
    ) String parentOID;
    @JsonProperty("Notes")
    @ApiModelProperty("备注")
    @JSONField(
            name = "Notes"
    )
    private String description;
    @JsonProperty("Start")
    @ApiModelProperty("开始日期")
    @DateValidation(
            message = "PARAMETER_INVALID_DATE"
    )
    @JSONField(
            name = "Start"
    )
    private @NotNull(
            message = "PARAMS_NOT_EMPTY"
    ) String startDate;
    @JsonProperty("Finish")
    @ApiModelProperty("完成日期")
    @DateValidation(
            message = "PARAMETER_INVALID_DATE"
    )
    @JSONField(
            name = "Finish"
    )
    private @NotNull(
            message = "PARAMS_NOT_EMPTY"
    ) String finishDate;
    @JsonProperty("PredecessorLink")
    @ApiModelProperty("前置任务")
    @JSONField(
            name = "PredecessorLink"
    )
    private List<TyppmPlusPredecessorLinkDTO> predecessorLink;
    @ApiModelProperty("类型oid")
    private String typeOID = null;
    @ApiModelProperty("类型otype")
    private String typeOTYPE = "ty.zddw.type.CTyTypedef";
    @ApiModelProperty("最后期限")
    @JsonProperty("Deadline")
    @DateValidation(
            message = "PARAMETER_INVALID_DATE"
    )
    @JSONField(
            name = "Deadline"
    )
    private String deadline;
    private String otype;
    @ApiModelProperty("删除标记")
    private String markForDelete;
    @ApiModelProperty("任务oid")
    private String jobOID;
    @ApiModelProperty("容器oid")
    private String containerOID = "";
    @ApiModelProperty("容器otype")
    private String containerOTYPE = "";
    @ApiModelProperty("安全级别")
    private String securityLabels;
    @ApiModelProperty("负责人oid")
    private String ownerOID;
    @ApiModelProperty("父otype")
    private @NotNull(
            message = "PARAMS_NOT_EMPTY"
    ) String parentOTYPE;
    @ApiModelProperty("状况描述")
    private String healthStatusDescription;
    @ApiModelProperty("状况")
    private String healthStatusType;
    @ApiModelProperty("风险情况描述")
    private String riskDescription;
    @ApiModelProperty("风险情况")
    private String riskType;
    @ApiModelProperty("模板类型:0(非模板),1(项目模板),2(计划模板),3(活动模板),4(团队模板),5(资源模板)")
    public String isTemplate;
    @ApiModelProperty("负责人角色oid")
    private String ownerGroupOid;
    @ApiModelProperty("执行人oid")
    private String executorOID = null;
    @ApiModelProperty("执行人角色oid")
    private String executorGroupOid;
    @ApiModelProperty("1(受控),0(非受控)")
    private String controlled;
    @ApiModelProperty("预警时间")
    @DateValidation(
            message = "PARAMETER_INVALID_DATE"
    )
    private String warningTime;
    @ApiModelProperty("计划工时")
    private String ratedHours;
    @ApiModelProperty("计划工时格式")
    private String ratedHoursFormat;
    @ApiModelProperty("截止时间前通知")
    private String beforeDeadline;
    @ApiModelProperty("截止时间后通知")
    private String afterDeadline;
    @ApiModelProperty("持续时间（工期），格式 DAYS，MOUTHS")
    private String durationFormat;
    @ApiModelProperty("已完成工期，格式 DAYS，MOUTHS")
    private String doneEffortFormat;
    @ApiModelProperty("任务完成百分比 默认 0/0")
    private String completedpercentage;
    @ApiModelProperty("显示时间线")
    private String showinTimeLine;
    @ApiModelProperty("锁定状态")
    private String lockStatus;
    @ApiModelProperty("锁定人")
    private String lockUserOid;
    @ApiModelProperty("iba属性集(保存用)")
    private Map<String, List<String>> ibaAttribute;
    @ApiModelProperty("通知列表")
    private List<ObjectMsgTempLinkDTO> noticeMessage;
    @ApiModelProperty("交付规则列表")
    private List<OutRuleParamDTO> outRuleParamVOList;
    @ApiModelProperty("开发负责人")
    private String devLeader;

    @ApiModelProperty("计划开始时间")
    private String devPlanStartTime;

    @ApiModelProperty("计划结束时间")
    private String devPlanEndTime;

    @ApiModelProperty("制造负责人")
    private String mfgLeader;

    @ApiModelProperty("计划开始时间")
    private String mfgPlanStartTime;

    @ApiModelProperty("计划结束时间")
    private String mfgPlanEndTime;

    @ApiModelProperty("外购负责人")
    private String purchaseLeader;

    @ApiModelProperty("计划开始时间")
    private String purchasePlanStartTime;

    @ApiModelProperty("计划结束时间")
    private String purchasePlanEndTime;

    @ApiModelProperty("负责人名称")
    private String ownerName;
}
